package com.hoshino.momochi.service.Impl;

import com.hoshino.momochi.mapper.BlogViewsMapper;
import com.hoshino.momochi.service.BlogViewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BlogViewsServiceImpl implements BlogViewsService {

    @Autowired
    private BlogViewsMapper blogViewsMapper;

    @Override
    public void addNewBlog(Long bid) {
        blogViewsMapper.addNewBlog(bid);
    }

    @Override
    public void increaseBlogViews(Long bid, Long num) {
        blogViewsMapper.increaseBlogViews(bid, num);
    }

    @Override
    public Long getBlogViews(Long bid) {
        return blogViewsMapper.getBlogViews(bid);
    }

    @Override
    public void delBlogViews(Long bid) {
        blogViewsMapper.delBlogViews(bid);
    }
}
